package com.example.lynandroid

import com.example.lynandroid.bean.DirectoryBean

const val KEY_DIR = "key_dir"
const val KEY_FRAGMENT_CLASS = "key_fragment_class"
const val FRAGMENT_PATCH9 = "fragment_patch9"
const val FRAGMENT_VIEW = "fragment_view"
const val ACTIVITY_BOOT = "activity_boot"
const val ACTIVITY_WINDOW = "activity_window"
const val FRAGMENT_WINDOW = "fragment_window"
const val FRAGMENT_EDIT = "fragment_edit"
const val FRAGMENT_INPUT = "fragment_input"

const val IMG1 = "https://www.toopic.cn/public/uploads/image/20200404/20200404182849_78999.jpg"
const val IMG2 = "https://www.lixian.fun/wp-content/uploads/2019/10/2019102909012421.jpg"
const val IMG3 = "https://img.tt98.com/d/file/pic/2018111014101613/5be64dce9952e.jpg"
const val IMG4 = "https://down.556z.com/upload/2021/11/202111041636034323146248.jpg"

fun getDir(): Array<DirectoryBean> {
    return arrayOf(
        DirectoryBean("最好的键盘切换", fragment = FRAGMENT_INPUT),
        DirectoryBean("九点图", fragment = FRAGMENT_PATCH9),
        DirectoryBean("Activity启动", img = IMG2, fragment = ACTIVITY_BOOT),
        DirectoryBean("WINDOW ACTIVITY VIEW", fragment = ACTIVITY_WINDOW),
        DirectoryBean("自定义View", img = IMG3, fragment = FRAGMENT_VIEW),
        DirectoryBean("研究Fragment", img = IMG4, fragment = FRAGMENT_WINDOW),
        DirectoryBean("研究EditText", fragment = FRAGMENT_EDIT),

        DirectoryBean("最好的键盘切换PRO", fragment = FRAGMENT_INPUT),
        DirectoryBean("九点图PRO", fragment = FRAGMENT_PATCH9),
        DirectoryBean("Activity启动PRO", img = IMG2, fragment = ACTIVITY_BOOT),
        DirectoryBean("WINDOW ACTIVITY VIEW PRO", fragment = ACTIVITY_WINDOW),
        DirectoryBean("自定义View PRO", img = IMG3, fragment = FRAGMENT_VIEW),
        DirectoryBean("研究Fragment PRO", img = IMG4, fragment = FRAGMENT_WINDOW),
        DirectoryBean("研究EditText PRO", fragment = FRAGMENT_EDIT)
    )
}


val imgMap = mutableMapOf(FRAGMENT_PATCH9 to IMG1)

val colorList = App.context?.resources?.obtainTypedArray(R.array.colors)